#include <stdio.h>
#include <math.h>

#include "ringBuffer.h"
#include "myComplex.h"
#include "fft.h"

myComplex v[fft_N], tmp[fft_N];

int main()
{
    printf("try FFT\n");

    /* 准备测试数据 */
    for(int k = 0; k < fft_N; ++k)
    {
        v[k] = myComplex_Make(600.0 + 300 * cos(690 * 2 * PI * k / (double)fft_Fs + 0.6)
                                + 200 * sin(100 * 2 * PI * k / (double)fft_Fs), 0);
    }

    fft(v, fft_N, tmp);

    fftShow(v, fft_N);

    return 0;
}
